<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1><h:outputText value="Dodaj użytkownika" /></h1>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="Name"/>
                <h:inputText value="#{bettor.name}"/>

                <h:outputText value="Login"/>
                <h:inputText value="#{bettor.login}"/>

                <h:outputText value="Password"/>
                <h:inputText value="#{bettor.password}"/>

                <h:outputText value="Surname"/>
                <h:inputText value="#{bettor.surname}"/>

                <h:outputText value="Email"/>
                <h:inputText value="#{bettor.email}"/>

                <h:outputText value="Address"/>
                <h:inputText value="#{bettor.address}"/>

                <h:outputText value="City"/>
                <h:inputText value="#{bettor.city}"/>

                <h:outputText value="Postcode"/>
                <h:inputText value="#{bettor.postcode}"/>

                <h:outputText value="Country"/>
                <h:inputText value="#{bettor.country}"/>

                <h:outputText value="Phone"/>
                <h:inputText value="#{bettor.phone}"/>

                <h:outputText value="Data urodzenia"/>
                <h:inputText id="birthDate" value="#{bettor.birthdate}">
                     <%--<f:convertDateTime pattern="yyyy/mm/dd"/>--%>
                </h:inputText>
                <h:message errorStyle="color:red" tooltip="true" for="birthDate"/>
            </h:panelGrid>
            <h:commandButton value="Dodaj" action="#{bettor.dodaj}">
                <f:param name="ok" value="ok"/>
            </h:commandButton>
        </h:form>
    </body>
</html>
</f:view>
